package com.chenqi.community.config;

import com.chenqi.community.handler.LoginHandler;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Ardai
 */
@Configuration
public class webConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginHandler()).excludePathPatterns("/toRegister", "/toLogin", "/list", "/post", "/userInfo*", "/type*", "/code", "/login", "/register")
                .excludePathPatterns("/static/**");
    }
}
